<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;
use const support\feed_back_status_remarks;
use const support\feed_back_type_remarks;

/**
 * @property integer $id ID(主键)
 * @property integer $member_id 会员ID
 * @property integer $type 反馈类型，1功能异常，2优化建议，3其他反馈
 * @property string $content 反馈信息
 * @property string $images 反馈图片
 * @property string $reply_content 回复内容
 * @property integer $status 反馈状态，1待处理，2已回复,9已删除
 * @property integer $created_time 创建时间
 * @property integer $updated_time 更新时间
 */
class RlFeedBack extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'rl_feed_backs';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    public function getTypeTitleAttribute($val): string
    {
        return feed_back_type_remarks[$this->type];
    }

    public function getStatusTitleAttribute($val): string
    {
        return feed_back_status_remarks[$this->status];
    }

    public $appends=['type_title','status_title'];
}
